package mainBoerse;

import java.util.Timer;
import java.util.TimerTask;

public class UpdateTimer extends Timer {

	public static UpdateTimer timer = null;

	private UpdateTimer() {
	};

	public static void startTimingWithOwnTimerTask(TimerTask task, int first, int last) {
		UpdateTimer timer = UpdateTimer.getInstance();
		 timer.scheduleAtFixedRate(task, first, last);
	}

	public static UpdateTimer getInstance() {
		if (timer == null) {
			timer = new UpdateTimer();
		}

		return timer;

	}
}
